//
//  HZRoomLogic.h
//  Model
//
//  Created by zeb-apple on 2017/5/26.
//  Copyright © 2017年 YDJH. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@class HZRoom,HZCommand,HZFurniture,HZOutsideWall,HZSandTable,HZConstruction;

#define SuppressPerformSelectorLeakWarning(Stuff) \
do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
Stuff; \
_Pragma("clang diagnostic pop") \
} while (0)


@interface HZRoomLogic : NSObject

//获取第一层 第一个房间
+ (HZRoom *)goBackFiristRoomWithBuildingStructure:(NSMutableArray *)buildingStructure;
//根据家具的状态返回一张图片
+ (UIImage *)goBackImageWithFurnitureState:(NSString *)state;

//根据指令 执行对应的方法 返回另一个房间的数据源
+ (HZRoom *)performSelectorWithFurniture:(HZFurniture *)furniture command:(HZCommand *)command buildingStructure:(NSMutableArray *)buildingStructure;

//根据指令 执行对应的方法  用与沙盘上的指令
+ (HZSandTable *)performSelectorWithFurniture:(HZFurniture *)furniture command:(HZCommand *)command construction:(HZConstruction *)construction;

//改变家具状态
+ (void)changeFurnitureState:(HZFurniture *)furniture withCommandName:(NSString *)commandName;

//更新所处房间位置
+ (void)updataBuildingCurrentIndex:(NSIndexPath *)indexPath;
//返回当前房间的位置
+ (NSIndexPath *)goBackBuildingCurrentIndex;
//返回建筑轮廓
+ (NSString *)goBackStructure;
//根据外墙返回 以及攀爬方向返回对应的房间
+ (HZRoom *)goBackRoomWhenOutsideWithOutsideWall:(HZOutsideWall *)outsideWall buildingStructure:(NSMutableArray *)buildingStructure direction:(NSInteger)direction; // 0 上 1 下 2 左 3 右

// 根据RoomViewController指令返回对应的操作
+ (SEL)goBackSelectFromRoomViewControllerActionWithFurniture:(HZFurniture *)furniture command:(HZCommand *)command;
// 根据HZOutsideRoomViewController指令返回对应的操作
+ (SEL)goBackSelectFromHZOutsideRoomViewControllerActionWithFurniture:(HZFurniture *)furniture command:(HZCommand *)command;
+ (NSString *)isNullToString:(id)string;
@end
